﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace HNCSolutions.ViewModel
{
    public class Paging
    {
        public int CurrentPage { get; set; }

        public int TotalPage { get; set; }

        public int PageRows { get; set; }

        public int NextPage 
        {
            get
            {
                return this.CurrentPage == this.LastPage ? this.TotalPage : this.CurrentPage + 1;
            }
        }

        public int PreviousPage 
        {
            get
            {
                return this.CurrentPage == this.FirstPage ? this.FirstPage : this.CurrentPage - 1;
            }
        }

        public int LastPage 
        {
            get
            {
                return this.TotalPage;
            }
        }

        public int FirstPage 
        {
            get
            {
                return 1;
            }
        }
    }
}